package com.example.lsrsbackend.service;
import com.example.lsrsbackend.model.DTO.ReservationRequest;
import com.example.lsrsbackend.model.view.ReservationVO;
import com.fasterxml.jackson.core.JsonProcessingException;

import java.util.Date;
import java.util.List;

//预约服务接口
public interface ReservationService {
    //TODO 预约座位
    String reserveSeat(ReservationRequest request) ;

    //TODO 取消预约
    void cancelReservation(String reservationId, String userId) throws JsonProcessingException;
    //TODO 取消预约（无需用户验证）
    void cancelReservationWithoutUserCheck(String reservationId) throws JsonProcessingException;
    //TODO 签到
    void checkIn(String reservationId, String userId) throws JsonProcessingException;

    //TODO 获取用户预约记录
    List<ReservationVO> getUserReservations(String username, int days);

    //TODO 处理预约超时
    void handleReservationTimeout(String reservationId);

    //TODO 检查预约限制
    boolean checkReservationLimit(String username, Date date);

    // TODO 批量处理超时预约
    void processTimeoutReservations();



    //TODO 获取所有预约记录
    List<ReservationVO> getAllReservations();

    void temporaryLeave(String reservationId, String username);
    void returnFromLeave(String reservationId, String username);

    // 新增：删除预约记录（物理删除）
    void deleteReservation(String reservationId, String username);

    // 检查用户状态
    boolean isUserFrozen(String username);
}
